package com.tac.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apiguardian.api.API;
import org.springframework.beans.factory.annotation.Required;
import springfox.documentation.spring.web.json.Json;

import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class User {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 手机
     */
    @ApiModelProperty(value = "手机",required = true)
    @NotNull(message = "请输入手机号" )

    private Long phone;

    /**
     * 头像
     */
    @ApiModelProperty("头像")
    private String haedImage;

    /**
     * 密码
     */
    @NotNull(message = "请输入密码")
    @ApiModelProperty(value = "密码",required = true)
    private String password;

    /**
     * 性别
     */
    @ApiModelProperty("性别")
    private String sex;

    /**
     * 生日
     */
    @ApiModelProperty("生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /**
     * 昵称
     */
    @ApiModelProperty("昵称")
    private String name;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("创建时间")
    private Date createTime;


}